//
//  BaseWeibo.h
//  NewsReader
//
//  Created by blacksun on 11-3-1.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QOauthKey.h"
#import "QWeiboRequest.h"

#define k_Oauth_Verifier	@"oauth_verifier"

@interface BaseWeibo : NSObject {
	QOauthKey *oauthKey;
    NSString *userId;
    NSString *userName;
}
@property (nonatomic, retain) QOauthKey *oauthKey;
@property (nonatomic, copy) NSString *userId;
@property (nonatomic, copy) NSString *userName;

- (void)parseTokenKeyWithResponse:(NSString *)aResponse;

- (void)parseOAuthVerifier:(NSString *)queryStr;


/**
 *从request的query string中获取某个key的值
 */
- (NSString*) valueForKey:(NSString *)key ofQuery:(NSString*)query;

-(void)getRequestToken;

-(NSURLRequest *)getAuthorizaRequest;

-(void) getAccessToken;

-(void) getUserName;

-(void) saveAccessToken;
//发送微薄
-(BOOL) sendTweet:(NSString *)tweet;


@end
